<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet library="css" name="default.css" />
        <h:outputStylesheet library="css" name="icons.css" />
        <title>
            <ui:insert name="title">
                LogAnalisis
            </ui:insert>
        </title>
    </h:head>

    <h:body>
        <p:ajaxStatus onstart="ajaxsts.show()" oncomplete="ajaxsts.hide()"/>
        <ui:insert name="dialogs"></ui:insert>
        <p:layout fullPage="true">
            <p:layoutUnit position="north" size="55" styleClass="panel-noborder-noradius" >
                <h:panelGrid columns="2" style="width: 99%;margin: 0;padding: 0" >
                    <h:panelGrid columns="2">
                        <h:graphicImage library="img" name="logo.png" />
                        <h:outputLabel value="Vale Esperar" styleClass="header-app-name" />
                    </h:panelGrid>
                    <h:form style="float: right" >
                        <p:menuButton value="Options">
                            <p:menuitem value="Change password" url="#" icon="ui-icon-unlocked" />
                            <p:menuitem value="Logout" icon="ui-icon-power" onclick="closessesion.show()" />
                        </p:menuButton>
                    </h:form>
                </h:panelGrid>
            </p:layoutUnit>

            <p:layoutUnit  id="statusbar" position="south" size="20" >
                <ui:insert name="statusbar" >

                </ui:insert>
            </p:layoutUnit>  

            <ui:insert name="left" >
            </ui:insert>

            <p:layoutUnit position="center" >
                <h:form id="frmcontent" >        
                    <p:growl id="gmessages" globalOnly="true" showSummary="true" showDetail="true" />
                    <p:panel id="panelcontent" styleClass="panel-noborder-noradius" >
                        <ui:insert name="content" >
                        </ui:insert>
                    </p:panel>
                </h:form>
            </p:layoutUnit>
        </p:layout>
        <p:dialog widgetVar="ajaxsts" modal="true" closable="false" maximizable="false" minimizable="false"
                  resizable="false">
            <h:panelGrid columns="1">
                <h:graphicImage library="img" name="ajax-loader.gif"/>
                <h:outputLabel value="please wait..." style="font-weight: normal;padding: 5px" />
            </h:panelGrid>
        </p:dialog>

        <h:form>
            <p:confirmDialog message="Are you sure to logout?"
                             header="Logout" severity="alert" 	
                             widgetVar="closessesion">
                <p:commandButton value="Yes Sure" action="#{loginBean.logout()}" ajax="false"
                                 oncomplete="closessesion.hide()"/>
                <p:commandButton value="Not Yet" onclick="closessesion.hide();" type="button" />
            </p:confirmDialog>
        </h:form>
        <ui:insert name="dialogs"></ui:insert>
    </h:body>
</html>
